
function alertJDialog(msg, successfunc){

	alertSfunc = successfunc;
	var dialog = jDialog.alert(msg,{},{
		showShadow: false,// 不显示对话框阴影
		buttonAlign : 'center',
		events : {
			show : function(evt){
				var dlg = evt.data.dialog;
			},
			close : function(evt){
				if(successfunc != null){
					successfunc();
				}
				var dlg = evt.data.dialog;
			},
			enterKey : function(evt){
			},
			escKey : function(evt){
				evt.data.dialog.close();
			}
		}
	 });
	

}


function confirmJDialog(msg, successfunc, failfunc){

	confirmSfunc = successfunc;
	confirmFfunc = failfunc;
	
	var dialog = jDialog.confirm(msg,{
		handler : function(button,dialog) {
			if(successfunc != null){
				successfunc();
			}
			
			dialog.close();
		}
	},{
		handler : function(button,dialog) {
			if(failfunc != null){
				failfunc();
			}
			
			dialog.close();
		}
	});
}


function messageJDialog(msg){
	var dialog = jDialog.message(msg,{
		autoClose : 3000,     // 3s后自动关闭
		padding : '30px',    	// 设置内部padding
		modal: false         	// 非模态，即不显示遮罩层
	});
}

function tipJDialog(msg, objpos){
	var dialog = jDialog.tip(msg,{
		target : objpos,
		position : 'left-top',
		trianglePosFromStart :0,
		offset : {
    		top :-20,
			left:10,
			right:0,
			bottom:0
			}
	},
	{
		autoClose : 10000
	});	
}

